import express, { Express, Request, Response } from 'express';

const app: Express = express();

app.get('/getrouters', (req: Request, res: Response) => {
  res.header("Access-Control-Allow-Origin", "*");
  res.json({
    routes: [
      {
        path: '/demo1',
        name: 'Demo1',
        component: 'demo1.vue'
      },
      {
        path: '/demo2',
        name: 'Demo2',
        component: 'demo2.vue'
      }
    ]
  })
})


app.listen(8888, () => {
  console.log('server start...port is 8888.....');
});
